<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>


    <script>

        // 每一个对象都有一个属性叫做constructor  指向它的构造器


        const arr = [1,2,3] ;
        console.log(arr.constructor === Array);   // f Array


        const obj = {a:1} ;
        console.log(obj.constructor === Object);

        const str = new String('hi') ;
        console.log(str.constructor === String);

    </script>
    
</body>
</html>